<?php
/**
 * author: JiangJun
 * CreateTime:2021/8/30 6:03 下午
 */

use Aws\S3\S3Client;

require '../vendor/autoload.php';

$s3Client = new S3Client([
   // 'profile' => 'default',
    'region' => 'ap-northeast-2',
    'version' => '2006-03-01'
]);

//Listing all S3 Bucket
$buckets = $s3Client->listBuckets();
foreach ($buckets['Buckets'] as $bucket) {
    echo $bucket['Name'] . "\n";
}
